package constructor;

public class Car {
	
	String make;
	String model;
	String color;
	int year;
	int maximumSpeed;
	int currentSpeed;
	boolean hasStarted;
	// this is how we define constructor 
	/*
	 *  if u donot provide constructor like this, then the complier will give default constructor without arguments.
	 */
	// if u give this, then the complier will not provide default constructor.
	
	Car(String newMake, String newModel){
		
		make = newMake;
		model = newModel;
	}

	void start() {

		System.out.println("I am starting the car");

		hasStarted = true;
		currentSpeed = 0;
	}

	void stop() {

		System.out.println("I am stopping the car");

		hasStarted = false;
		currentSpeed = 0;
	}

	void changeColor(String newColor) {

		color = newColor;

	}

	int accelerate(int howMuch) {
		currentSpeed = currentSpeed + howMuch;
		return currentSpeed;

	}

	
	
	
	
	

}
